package com.freemalll.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.freemalll.system.domain.SysOrganizationActRel;
import com.freemalll.system.mapper.SysOrganizationActRelMapper;
import com.freemalll.system.service.ISysOrganizationActRelService;

/**
 * 组织机构账户关系 服务层实现
 * 
 * @author freemalll
 */
@Service
public class SysOrganizationActRelServiceImpl implements ISysOrganizationActRelService
{
    @Autowired
    private SysOrganizationActRelMapper organizationActRelMapper;

    @Override
    public SysOrganizationActRel selectOrganizationActRelById(String id)
    {
        return organizationActRelMapper.selectOrganizationActRelById(id);
    }

    @Override
    public List<SysOrganizationActRel> selectOrganizationActRelByAccountId(String accountId)
    {
        return organizationActRelMapper.selectOrganizationActRelByAccountId(accountId);
    }

    @Override
    public List<SysOrganizationActRel> selectOrganizationActRelList(SysOrganizationActRel organizationActRel)
    {
        return organizationActRelMapper.selectOrganizationActRelList(organizationActRel);
    }

    @Override
    public int insertOrganizationActRel(SysOrganizationActRel organizationActRel)
    {
        return organizationActRelMapper.insert(organizationActRel);
    }

    @Override
    public int updateOrganizationActRel(SysOrganizationActRel organizationActRel)
    {
        return organizationActRelMapper.updateById(organizationActRel);
    }

    @Override
    public void deleteOrganizationActRelByIds(String[] ids)
    {
        for (String id : ids)
        {
            organizationActRelMapper.deleteById(id);
        }
    }

    @Override
    public int deleteOrganizationActRelById(String id)
    {
        return organizationActRelMapper.deleteById(id);
    }
}